<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>智银华通-添加/修改系统菜单</title>
<link rel="shortcut icon" type="image/ico" href="${basePath}/favicon.ico?v=1"/>
<link rel="stylesheet" type="text/css" href="${basePath}/css/style_2_common.css?BPm" />
<link href="${basePath}/css/style-1.css?id=103" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="${basePath}/css/default_user_com.css" media="all">
<link rel="stylesheet" type="text/css" href="${basePath}/js/layer/skin/layer.css" >
<link rel="stylesheet" type="text/css" href="${basePath}/js/ztree/css/style.css" />
<script type="text/javascript" src="${basePath}/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="${basePath}/js/ztree/jquery.ztree.core-3.5.min.js"></script>
<script type="text/javascript" src="${basePath}/js/ztree/jquery.ztree.excheck-3.5.min.js"></script>
<script src="${basePath}/js/layer/layer.m.js" type="text/javascript"></script>
<style type="text/css" rel="stylesheet">
	input,textarea{width:400px;}
	select{width:150px;}
	textarea.px{height:50px;}
	ul.ztree {
    background: #f0f6e4 none repeat scroll 0 0;
    border: 1px solid #617775;
    height: 150px;
    margin-top: 10px;
    overflow-x: auto;
    overflow-y: scroll;
    width: 220px;
}
</style>
<script type="text/javascript">
function onClick(event, treeId, treeNode, clickFlag) {
	$("#parentId").attr("value",treeNode.id);
	$("#parentMenuName").attr("value",outClickParentNode(treeNode,0));
}

function outClickParentNode(treeNode,i) {
	if(i>9){return ".../";}
	i=i+1;
	var name= "/";
	if(treeNode!=null){
		name = treeNode.name+name;
	}
	var nodeP = treeNode.getParentNode();
	if(nodeP!=null){
		name =  outClickParentNode(nodeP,i)+name;
	}
	return  name; 
}


var setting = {
	    data: {
	        simpleData: {
	            enable: true,
	            idKey: "id",
	            pIdKey: "parentId",
	            rootPId: 0
	        }
	    },
	    callback: {
	        onClick: onClick
	    }
	};
	
<#if nodes?exists>
var zNodes=${nodes};
<#else>
var zNodes=[];
</#if>
</script>
</head>
<body id="nv_member" class="pg_CURMODULE">
<#assign menu_index="menu_106">
<#assign current='menu_sysmenu'>
	<div id="wp" class="wp">
		<#include "/include/header.html"/>
		<div class="contentmanage">
			<div class="developer">
				<div class="tableContent">
                    <#include "/include/left.html"/>
                        <#include "/include/wxtop.html"/>
                    <div class="content">
						<form method="post" action="${basePath}/admin/menu/persist" >
							<input type="hidden" name="id" value="${bean.id?default('')}"/>
							<div class="msgWrap">
							<table class="userinfoArea" border="0" cellspacing="0" cellpadding="0" width="100%">
								<tbody>
									<tr>
										<th><span class="red">*</span>菜单名称：</th>
										<td>
											<input type="text" placeholder="请输入菜单名称名称" class="px" name="menuName" value="${bean.menuName}" maxlength="20" />
										</td>
									</tr>
									<tr>
										<th><span class="red"></span>菜单地址：</th>
										<td>
											<input type="text" placeholder="请输入菜单地址" class="px" name="menuHref" value="${bean.menuHref}" maxlength="100"> 
										</td>
									</tr>
									<tr>
										<th><span class="red">*</span>父菜单：</th>
										<td>
										<input type="text" placeholder="请选择父级菜单" class="px" id="parentMenuName" name="parentMenuName" value="" maxlength="100" readonly="readonly">
										<button id="menulistb"  type="button">菜单列表</button>
										<input type="hidden" name="parentId" id="parentId" value="${(bean.parentId!0)?c}">
													<div id="menutree" style="display: none;">
														<ul id="tree_panel" class="ztree" style="-moz-user-select: none;">
														</ul>
													</div>
											 
										</td>
									</tr>
									<tr>
										<th><span class="red">*</span>是否显示：</th>
										<td>
											<select name="menuShow">
												<option value="1">是</option>
												<option value="0" <#if bean.menuShow==0>selected</#if>>否</option>
											</select> 
										</td>
									</tr>
									<#-- 
									<tr>
										<th><span class="red">*</span>菜单类型：</th>
										<td>
											<select name="menuShow">
												<option value="2">微信管理菜单</option>
												<option value="1" <#if bean.menuType==1>selected</#if>>系统菜单</option>
											</select> 
										</td>
									</tr>
									 -->
									<tr>
										<th><span class="red">*</span>菜单排序：</th>
										<td>
											<input type="number" placeholder="请输入菜单排序数值"  class="px" name="menuOrder" value="${bean.menuOrder?default(1)}" maxlength="4"> 
										</td>
									</tr>
									<tr>
										<th><span class="red"></span>菜单标识：</th>
										<td>
											<input type="text"placeholder="请输入菜单标识"  class="px" name="menuFlag" value="${bean.menuFlag}" maxlength="50">
											<br/>用于菜单选中状态判断
										</td>
									</tr>
									<tr>
										<th><span class="red"></span>菜单说明：</th>
										<td>
											<textarea name="menuDesc" maxlength="100" class="px">${bean.menuDesc}</textarea> 
										</td>
									</tr>
									<tr>
										<th><span class="red"></span>菜单图标：</th>
										<td>
											<#-- <input type="text" placeholder="请输入菜单图标"  class="px" name="menuIcon" value="${bean.menuIcon}" maxlength="10">-->
											<select name="menuIcon">
												<option></option>
												<option value="bank" <#if bean.menuIcon?exists&&bean.menuIcon=='bank'>selected</#if>>银行</option>
												<option value="phone" <#if bean.menuIcon?exists&&bean.menuIcon=='phone'>selected</#if>>手机</option>
												<option value="paper" <#if bean.menuIcon?exists&&bean.menuIcon=='paper'>selected</#if>>纸张</option>
												<option value="pepoles" <#if bean.menuIcon?exists&&bean.menuIcon=='pepoles'>selected</#if>>多人</option>
												<option value="customer" <#if bean.menuIcon?exists&&bean.menuIcon=='customer'>selected</#if>>客服</option>
												<option value="activity" <#if bean.menuIcon?exists&&bean.menuIcon=='activity'>selected</#if>>活动</option>
												<option value="hour24" <#if bean.menuIcon?exists&&bean.menuIcon=='hour24'>selected</#if>>24小时</option>
												<option value="platform" <#if bean.menuIcon?exists&&bean.menuIcon=='platform'>selected</#if>>平台</option>
												<option value="circlepie" <#if bean.menuIcon?exists&&bean.menuIcon=='circlepie'>selected</#if>>环饼</option>
												<option value="branch" <#if bean.menuIcon?exists&&bean.menuIcon=='branch'>selected</#if>>分支</option>
												<option value="person" <#if bean.menuIcon?exists&&bean.menuIcon=='person'>selected</#if>>单人</option>
												<option value="setting" <#if bean.menuIcon?exists&&bean.menuIcon=='setting'>selected</#if>>设置</option>
											</select>
											当前是：<span class="preview"><b class="${bean.menuIcon}"></b>${bean.menuIcon}</span>
										</td>
									</tr>
									<tr>
										<th><span class="red"></span>显示新功能标签：</th>
										<td>
											<select name="newFlag">
												<option value="0">否</option>
												<option value="1" <#if bean.newFlag==1>selected</#if>>是</option>
											</select> 
										</td>
									</tr>
									<tr>
                                        <th><span class="red"></span>权限别名：</th>
                                        <td>
                                            <textarea name="permissions" maxlength="100" class="px">${bean.permissions}</textarea> 
                                        </td>
                                    </tr>
									<tr>
										<th></th>
										<td><button type="button" class="btnGreen" id="saveSetting">保存</button></td>
									</tr>
								</tbody>
							</table>
							</div>
						</form>
					</div>
					<div class="clr"></div>
				</div>
			</div>
		</div>
		<!--底部-->
	</div>
	</div>
	</div>
	</div>
	<#include "/include/footer.html"/>
	<script type="text/javascript">
		var basepath = '${basepath}';
	</script>
	<script type="text/javascript" src="${basePath}/js/system/include_menu_add.js"></script>
</body>
</html>